
{% load staticfiles %}
<div class="banner">
      <div id="slide-holder">
        <div id="slide-runner">
            <a href ="javascript:return false;" target="_blank"><img id="slide-img-1" src="/uploads/{{ adlist1.image_url }}"  alt="" /></a>
{#            <a href="{% url 'article' %}?id={{ ad_list.article }}" target="_blank"><img id="slide-img-1" src="/uploads/{{ adlist1.image_url }}"  alt="" /></a>#}
            <a href ="javascript:return false;" target="_blank"><img id="slide-img-2" src="/uploads/{{ adlist2.image_url }}"  alt="" /></a>
{#            <a href="/" target="_blank"><img id="slide-img-3" src="/uploads/{{ adlist3.image_url }}"  alt="" /></a>#}
{#            <a href="/" target="_blank"><img id="slide-img-4" src="/uploads/{{ adlist4.image_url }}"  alt="" /></a>#}
          <div id="slide-controls">
            <p id="slide-client" class="text"><strong></strong><span></span></p>
            <p id="slide-desc" class="text"></p>
            <p id="slide-nav"></p>
          </div>
        </div>
      </div>
      <script>
    if(!window.slider) {
    var slider={};
  }

  slider.data= [
            {% for ad in ad_list %}
    {
        "id":"slide-img-{{ ad.index }}", // 与slide-runner中的img标签id对应
        "client":'{{ ad.title | slice:':15' }}',
        "desc":'{{ ad.description | slice:':20' }}' //这里修改描述
    },
      {% endfor %}

{#    {#}
{#        "id":"slide-img-1", // 与slide-runner中的img标签id对应#}
{#        "client":"标题1",#}
{#        "desc":"这里修改描述 这里修改描述 这里修改描述" //这里修改描述#}
{#    },#}
{#    {#}
{#        "id":"slide-img-2",#}
{#        "client":"标题2",#}
{#        "desc":"add your description here"#}
{#    },#}
{#    {#}
{#        "id":"slide-img-3",#}
{#        "client":"标题3",#}
{#        "desc":"add your description here"#}
{#    },#}
{#    {#}
{#        "id":"slide-img-4",#}
{#        "client":"标题4",#}
{#        "desc":"add your description here"#}
{#    }#}
  ];

    </script>
    </div>
    <!-- banner代码 结束 -->
